#ifndef _MCUDRIVERS_UART_UART_H
#define	_MCUDRIVERS_UART_UART_H

#include <xc.h>
#include <stdint.h>

typedef enum
{
    /* Indicates that Receive buffer has data, at least one more character can be read */
    UART_RX_DATA_AVAILABLE
        /*DOM-IGNORE-BEGIN*/  = (1 << 0) /*DOM-IGNORE-END*/,
    
    /* Indicates that Receive buffer has overflowed */
    UART_RX_OVERRUN_ERROR
        /*DOM-IGNORE-BEGIN*/  = (1 << 1) /*DOM-IGNORE-END*/,

    /* Indicates that Framing error has been detected for the current character */
    UART_FRAMING_ERROR
        /*DOM-IGNORE-BEGIN*/  = (1 << 2) /*DOM-IGNORE-END*/,

    /* Indicates that Parity error has been detected for the current character */
    UART_PARITY_ERROR
        /*DOM-IGNORE-BEGIN*/  = (1 << 3) /*DOM-IGNORE-END*/,

    /* Indicates that Receiver is Idle */
    UART_RECEIVER_IDLE
        /*DOM-IGNORE-BEGIN*/  = (1 << 4) /*DOM-IGNORE-END*/,

    /* Indicates that the last transmission has completed */
    UART_TX_COMPLETE
        /*DOM-IGNORE-BEGIN*/  = (1 << 8) /*DOM-IGNORE-END*/,

    /* Indicates that Transmit buffer is full */
    UART_TX_FULL
        /*DOM-IGNORE-BEGIN*/  = (1 << 9) /*DOM-IGNORE-END*/

}UART_STATUS;

void Uart_Initial_g( uint32_t baudrate);

void Uart_WriteByte_g(uint8_t byte);
void Uart_WriteBytes_g(uint8_t *arrayBytes,uint8_t length);
void Uart_Printf_g(const char *fmt,...);

uint8_t Uart_ReadByte(void);

#endif	/* XC_HEADER_TEMPLATE_H */

